#include "Avalon/WebServices/HttpServerPredicates.hpp"
#include <boost/lambda/lambda.hpp>
#include "Avalon/WebServices/HttpServerRequest.hpp"

using namespace Avalon;
using namespace Avalon::WebServices;
using namespace boost;
using namespace boost::lambda;
using namespace std;

bool Avalon::WebServices::MatchAnyHttpRequest(
    const HttpServerRequest* request) {
  return true;
}

HttpServer::HttpRequestPredicate Avalon::WebServices::MatchesPath(
    HttpMethod method, const string& path) {
  return (bind(&Uri::GetPath,
    bind(&HttpServerRequest::GetUri, lambda::_1)) == path) &&
    bind(&HttpServerRequest::GetMethod, lambda::_1) == method;
}
